Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

errlop

Package Overview
Dependencies
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errlop

An extended Error class that envelops a parent error, such that the stack trace contains the causation

  • 2.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
744K
decreased by-13.58%
Maintainers
2
Weekly downloads
 
Created

What is errlop?

Errlop is a utility for creating and managing error objects in JavaScript. It allows you to wrap errors, add additional context, and handle them in a more structured way.

What are errlop's main functionalities?

Creating a basic Errlop error

This feature allows you to create a basic Errlop error with a custom message.

const Errlop = require('errlop');
const error = new Errlop('Something went wrong');
console.log(error.message);

Wrapping an existing error

This feature allows you to wrap an existing error with a new Errlop error, preserving the original error as the cause.

const Errlop = require('errlop');
const originalError = new Error('Original error');
const wrappedError = new Errlop('Something went wrong', originalError);
console.log(wrappedError.message);
console.log(wrappedError.cause);

Adding additional context

This feature allows you to add additional context to an Errlop error, which can be useful for debugging.

const Errlop = require('errlop');
const error = new Errlop('Something went wrong', { context: 'Additional context' });
console.log(error.context);

Other packages similar to errlop

Keywords

FAQs

Package last updated on 04 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc